from treenode import TreeNode, ValidBST, midorder_dg, list_to_tree


def is_valid_BST(root):
    # return ValidBST().validate(root)
    return ValidBST.helper(root)


if __name__ == '__main__':
    a = TreeNode(5)
    a.left = TreeNode(1)
    a.right = TreeNode(4)
    a.right.left = TreeNode(3)
    a.right.right = TreeNode(6)
    # midorder_dg(a)
    # print()
    b = list_to_tree([5, 1, 4, None, None, 3, 6])
    # b = TreeNode(1)
    # b.left = TreeNode(1)
    # midorder_dg(b)
    # print(is_valid_BST(b))

